import request from "@/utils/request";
import { ParseData } from "@/utils/utils";

//获取专家列表分页
export const GetExpertList = (data: any) => {
  return request({
    method: "GET",
    url: `/zhuanjia?${ParseData(data)}`,
  });
};
//新建专家
export const AddExpert = (data: any) => {
  return request({
    method: "POST",
    url: `/zhuanjia`,
    data
  });
};
//编辑专家
export const EditExpert = (data: any) => {
  return request({
    method: "PUT",
    url: `/zhuanjia`,
    data
  });
};
//查询专家
export const GetExpert = (data: any) => {
  return request({
    method: "GET",
    url: `/zhuanjia/${data.id}`,
  });
};
//专家详情
export const GetExpertDetail = (data: any) => {
  return request({
    method: "GET",
    url: `/zhuanjia/xiangqing/${data.id}`,
  });
};
//审核专家
export const ReviewExpert = (data: any) => {
  return request({
    method: "PUT",
    url: `/zhuanjia/shenhe`,
    data
  });
};
//获取专家详情业绩案例列表分页
export const GetExpertDemoList = (data: any) => {
  return request({
    method: "GET",
    url: `/zhuanjia/xiangqing/xiangmu?${ParseData(data)}`,
  });
};
//获取专家详情产品列表分页
export const GetExpertProductList = (data: any) => {
  return request({
    method: "GET",
    url: `/zhuanjia/xiangqing/chanpin?${ParseData(data)}`,
  });
};
//专家详情添加产品
export const AddExpertProduct = (data: any) => {
  return request({
    method: "POST",
    url: `/zhuanjia/xiangqing/chanpin`,
    data
  });
};
//获取专家详情评论信息
export const GetExpertCommentList = (data: any) => {
  return request({
    method: "GET",
    url: `/zhuanjia/xiangqing/pinglun?${ParseData(data)}`,
  });
};
//获取选择的专家列表信息
export const GetSelectExpertList = (data: any) => {
  return request({
    method: "GET",
    url: `/zhuanjia/xuanze?${ParseData(data)}`,
  });
};
//专家上传
export const ExpertUpload = (data: any) => {
  return request({
    method: "POST",
    url: `/zhuanjia/daoru`,
    data
  });
};
